package cn.oms.stock.provider.dao.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author AllenChen曾晨
 * @since 2022-04-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("stock_drug_info")
@ApiModel(value="DrugInfo对象", description="")
public class DrugInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "药库药品信息ID（新增生成）(UUID)")
    @TableField("STOCK_ID")
    private String stockId;

    @ApiModelProperty(value = "药店信息CODE（L3 PHA、G OPP、LG PHA、STR）（对应科室表CODE）")
    @TableField("DEPARTMENT_CODE")
    private String departmentCode;

    @ApiModelProperty(value = "药店信息名称（对应药房信息表）")
    @TableField("DEPARTMENT_NAME")
    private String departmentName;

    @ApiModelProperty(value = "药品CODE（对应药品知识库药品新增药品生成的编码）")
    @TableField("ITEM_CODE")
    private String itemCode;

    @ApiModelProperty(value = "药品详情（对应药品知识库药品详情信息）")
    @TableField("ITEM_DESCRIPTION")
    private String itemDescription;

    @ApiModelProperty(value = "货架位置（Z1-AS2-03 (S)、Z1-A101-01(W)）")
    @TableField("SHELF_LOCATION")
    private String shelfLocation;

    @ApiModelProperty(value = "基本单位CODE（tablet）")
    @TableField("UNIT_CODE")
    private String unitCode;

    @ApiModelProperty(value = "基本单位名称")
    @TableField("UNIT_NAME")
    private String unitName;

    @ApiModelProperty(value = "可用存量（开药就扣减这里）")
    @TableField("AVAILABLE_QTY")
    private BigDecimal availableQty;

    @ApiModelProperty(value = "冻结预存量（未付费）（开药扣减量存这里）")
    @TableField("FREEZE_QTY")
    private BigDecimal freezeQty;

    @ApiModelProperty(value = "在用量（挂起状态）（已付费）")
    @TableField("IN_USE_QTY")
    private BigDecimal inUseQty;

    @ApiModelProperty(value = "总数量（可用存量+冻结预存量+在用量+过期量）")
    @TableField("TOTAL_QTY")
    private BigDecimal totalQty;

    @ApiModelProperty(value = "过期量（药品过期）")
    @TableField("OVERDUE_QTY")
    private BigDecimal overdueQty;

    @ApiModelProperty(value = "预警值（低于可用存量预警值）")
    @TableField("WARNING_QTY")
    private BigDecimal warningQty;

    @ApiModelProperty(value = "创建人编号CODE（对应医生信息表）")
    @TableField("CREATE_MAN_ID")
    private String createManId;

    @ApiModelProperty(value = "创建人名称")
    @TableField("CREATE_MAN_NAME")
    private String createManName;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATE_TIME")
    private LocalDate createTime;

    @ApiModelProperty(value = "删除标记")
    @TableField("DEL_FLAG")
    private Integer delFlag;


}
